﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using CarShop.Domain.Entities;

namespace CarShop.Data.EntityFramework.Mappings
{
    internal class OrderStatusConfiguration : EntityBaseConfiguration<OrderStatus, int>
    {
        public OrderStatusConfiguration()
        {
            Property(o => o.Name).IsRequired().HasMaxLength(50);

            HasMany(o => o.Orders).WithRequired(o => o.OrderStatus).HasForeignKey(o => o.OrderStatusId);
        }

    }
}
